package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.PalletBoxList;
import com.wing.purchase.model.response.PalletBoxListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 托盘料箱清单-Dao
 *
 * @author
 */
@Mapper
public interface PalletBoxListDao extends BaseMapper<PalletBoxList> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PalletBoxListVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<PalletBoxListVO> list4app(@Param("page") Page<PalletBoxListVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PalletBoxListVO get4appById(Long id);

    PalletBoxListVO getPalletBox(@Param("code") String code, @Param("warehouseId") Long warehouseId);

    PalletBoxListVO getPalletBoxByLabelCode(String code);

    List<PalletBoxListVO> getBoxByDeliveryDetailId(Long deliveryDetailId);

    /**
     * 查询入库计划产品的料箱以及料箱的条码
     * @param jobProductId
     * @param planId
     * @return
     */
    List<PalletBoxListVO> getPLanProductBoxByJobProductId(@Param("jobProductId") Long jobProductId, @Param("planId") Long planId);

    /**
     * 查询出库作业/产品的料箱数据和仓库库存
     * @param skuCode
     * @param warehouseId
     * @return
     */
    List<PalletBoxListVO> getOutWorkPalletBoxList(@Param("skuCode") String skuCode, @Param("warehouseId") Long warehouseId);
}
